<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta name="author" content="闻永明">
		<title>武汉地铁数据查看系统</title>
		<link rel="stylesheet" href="lib/layui/css/layui.css">
		<style type="text/css">
			.container {
				/*box-sizing:border-box;*/
				margin-top: 20px;
				width: 420px;
				height: 320px;
				min-height: 320px;
				max-height: 320px;
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				margin: auto;
				padding: 20px 20px 20px 20px;
				z-index: 130;
				border-radius: 8px;
				background-color: #fff;
				box-shadow: 0 3px 18px rgba(100, 0, 0, .5);
				font-size: 16px;
			}
			
			.close {
				background-color: white;
				border: none;
				font-size: 18px;
				margin-left: 410px;
				margin-top: -10px;
			}
			
			.layui-input {
				border-radius: 5px;
				width: 300px;
				height: 40px;
				font-size: 15px;
			}
			
			.layui-form-item {
				margin-left: -20px;
			}
			
			#logoid {
				margin-top: -16px;
				padding-left: 150px;
				padding-bottom: 15px;
			}
			
			.layui-btn {
				margin-left: -50px;
				border-radius: 5px;
				width: 350px;
				height: 40px;
				font-size: 15px;
			}
			
			.verity {
				width: 120px;
			}
			
			.font-set {
				font-size: 13px;
				text-decoration: none;
				margin-left: 120px;
			}
			
			a:hover {
				text-decoration: underline;
			}
			
			.title {
				width: 100%;
				height: 40%;
				padding: 40px 0 0 0;
				color: #009688;
				font-size: 40px;
				font-weight: bold;
				text-align: center;
			}
		</style>
	</head>

	<body>
		<div class="title">
			武汉市地铁数据查看系统
		</div>
		<div class="layui-form" action="#">
			<div class="container">
				<button class="close" title="关闭">X</button>
				<div class="layui-form-mid layui-word-aux">
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">用户名</label>
					<div class="layui-input-block">
						<input type="text" name="username" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">密 &nbsp;&nbsp;码</label>
					<div class="layui-input-inline">
						<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">登陆</button>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript" src="lib/layui/layui.js"></script>
		<script>
			layui.use(['form', 'jquery',"layer"], function() {
				var form = layui.form,
					layer = layui.layer;
				form.on('submit(formDemo)', function(data) {
					console.log(data.field.username)
					console.log(data.field.password)
					var username=data.field.username
					var pass=data.field.password
					if (username=="admin"&&pass=="123456") {
						window.location.href="index.html"
					}else{
						layer.msg('账号或密码错误'); 
					}

				});
			});
		</script>
	</body>

</html>